Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes approach for setting the required tabs from URL parameters #358

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

jsheunis
Copy link
Member

@jsheunis jsheunis commented Sep 28, 2023

This PR is in response to: sfb1451/metadata-catalog#33, which exists as a result of a regression introduced in d25dcd2

This issue has in the past resulted in erratic tab selection, and it relates to a number of previous issues:

The new update discards the use of $refs for finding available tabs because of an issue with asynchronous loading of $root, the dataset component and its subcomponents, and $refs. It can happen that $refs might or might not be defined at the time when created() or mounted() is called in the vue app life cycle. For a more useful description, see https://stackoverflow.com/questions/54355375/vue-js-refs-are-undefined-even-though-this-refs-shows-theyre-there.

Instead, the new method determines the available tabs from the root component data, and accesses this list both on 'created()' and on 'beforeRouteUpdate()' in order to check the provided URL parameter against this list.

This discard use of '' for finding available tabs
because of an issue with asynchronous loading of the
dataset component and its subcomponents, which include
tabs that might or might not be defined at the time
when 'created()' or 'mounted()' is called in the vue
app life cycle. This issue has in the past resulted
in erratic tab selection.

Instead, the new method determines the available tabs
from the root component data, and accesses this list
both on 'created()' and on 'beforeRouteUpdate()' to
check the provided URL parameter against.
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d25dcd2) 86.19% compared to head (625afc2) 86.19%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #358   +/-   ##
=======================================
  Coverage   86.19%   86.19%           
=======================================
  Files          43       43           
  Lines        2709     2709           
=======================================
  Hits         2335     2335           
  Misses        374      374           
Flag Coverage Δ
unittests 79.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsheunis
Copy link
Member Author

A sneaky but very small addition to the PR is: 922fc67

In response to: sfb1451/metadata-catalog#31

@jsheunis jsheunis merged commit 73521ee into main Sep 28, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants